package com.agann.util;

import com.agann.model.Memory;
import com.agann.model.Record;

public class AD extends Memory {
	

	/**
	 * Type Code
	 */
	public static final String TYPE_CODE = "AD";
	public static final String AD_SCORE = "ad_score";

	public AD(String code) {
		super(code);
	}

	@Override
	public void update(Record record) {
		double t = (record.getClose()-record.getOpen())/(record.getHigh()-record.getLow());
		setScore(AD_SCORE, t * record.getVolumn());
	}

	@Override
	public void merge(String code) {
		// TODO Auto-generated method stub
		
	}

	@Override
	public void change(double rate) {
		// TODO Auto-generated method stub
		
	}

}
